import { axios } from '@/utils/request'
// 日志模块的api

// 获取客户端操作日志(升级异常统计列表)
function getClientLog (query) {
  return axios({
    url: '/user-service/clientLog',
    method: 'get',
    params: query
  })
}

// 获取客户端操作日志(升级异常统计列表)
function getFotaLog (query) {
  return axios({
    url: '/user-service/clientLog/fotalog',
    method: 'get',
    params: query
  })
}

// 升级异常车型分布
function getClientLogModelStatistics (query) {
  return axios({
    url: '/user-service/clientLog/model/statistics',
    method: 'get',
    params: query
  })
}

// 导出升级异常日志明细
function exportClientLog (query) {
  return axios({
    url: '/user-service/clientLog/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 导出升级异常车型分布
function exportClientLogModelStatistics (query) {
  return axios({
    url: '/user-service/clientLog/model/statistics/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 服务异常统计列表
function getServiceExceptionLog (query) {
  return axios({
    url: '/service-sale/service/statistics/summary',
    method: 'get',
    params: query
  })
}

// 服务异常车型分布列表
function getServiceExceptionDistribute (query) {
  return axios({
    url: '/service-sale/service/statistics/distribute',
    method: 'get',
    params: query
  })
}

// 导出异常统计明细
function exportServiceExceptionLogDetail (query) {
  return axios({
    url: '/service-sale/service/statistics/export/detail',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 导出异常统计分布
function exportServiceExceptionLogDistribute (query) {
  return axios({
    url: '/service-sale/service/statistics/export/distribute',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 获取加帮助说明
function getHelpInstructions () {
  return axios({
    url: '/user-service/help/getSysHelp',
    method: 'get'
  })
}
// 增加帮助说明
function addHelpInstructions (data) {
  return axios({
    url: '/user-service/help/add',
    method: 'post',
    data
  })
}
export default {
  getClientLog,
  getClientLogModelStatistics,
  exportClientLog,
  exportClientLogModelStatistics,
  getServiceExceptionLog,
  exportServiceExceptionLogDetail,
  exportServiceExceptionLogDistribute,
  getServiceExceptionDistribute,
  getFotaLog,
  getHelpInstructions,
  addHelpInstructions
}
